package com.geovis.emergency.spd.biz.pc.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.geovis.emergency.spd.entity.pc.entity.PcPlan;
import com.geovis.emergency.spd.entity.pc.pojo.dto.PcPlanQueryDTO;
import com.geovis.emergency.spd.entity.pc.pojo.dto.PcPlanSaveDTO;
import com.geovis.emergency.spd.entity.pc.pojo.dto.PcPlanUpdateDTO;
import com.geovis.emergency.spd.entity.pc.pojo.vo.PcPlanDetailVO;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 应急预案指挥模块 - 预案管理 服务类
 * </p>
 *
 * @author Lonsho
 * @since 2022-06-17
 */
public interface IPcPlanService extends IService<PcPlan> {

    public void savePcPlan(PcPlanSaveDTO pcPlanSaveDTO);

    public void updatePcPlan(PcPlanUpdateDTO pcPlanUpdateDTO);

    PcPlanDetailVO detailVO(String pcPlanId);

    public LambdaQueryWrapper<PcPlan> getWrapper(PcPlanQueryDTO queryDTO);

    /**
     * 校验预案是否有关联的灾害事件
     * @param idList
     * @return
     */
    boolean hasRelatedDisaster(Set<String> idList);

    /**
     * 校验方案是否含有该用户
     */
    String checkPlanExistUsers(Set<String> userIds);

    /**
     * 校验预案是否已绑定灾害
     */
    Boolean checkInDisaster(List<String> ids,Boolean containStopDisaster);

}
